package com.project.forlearningdemo.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.util.Date;
import java.util.List;

@ApiModel("Comment 评论对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Comment {

    @ApiModelProperty("评论编号")
    private Integer commentId;

    @ApiModelProperty("资源编号")
    private Integer resourceId;

    @ApiModelProperty("评论者编号")
    private Integer userId;

    @ApiModelProperty("评论者昵称 不需要传值")
    private String name;

    @ApiModelProperty("评论者头像 不需要传值")
    private String headImage;

    @ApiModelProperty("打分")
    private Integer starNum;

    @ApiModelProperty("评论内容")
    private String commentInfo;

    @ApiModelProperty("评论时间")
    @JSONField(format = "yyyy-MM-dd hh:mm:ss")
    private Date pTime;

    @ApiModelProperty("评论对象 不需要传值")
    private List<Comment> toComment;

    @ApiModelProperty("评论对象编号")
    private Integer toCommentId;
}
